import { ShowTypeBaseAmcaxProp } from './baseAmcaxProp';

const FlowRegime = {
  Type: {
    Subsonic: {},
  },
  Default: 'Subsonic',
};
const InitialConditions = {
  Type: 'group',
  VelocityType: {
    EmitChange: true,
    Type: 'option',
    Options: ['Cartesian', 'Cylindrical'],
    Default: 'Cartesian',
  },
  CartesianVelocityComponents: {
    HandleChange: {
      VelocityType: {
        Cartesian: {},
      },
    },
    Type: {
      Automatic: {
        VelocityScale: {
          Maskable: true,
          Type: 'expression',
          Default: 1.0,
          Unit: 'speed',
          DefaultUnit: 'm/s',
        },
      },
      'Automatic with Value': {
        U: {
          Type: 'expression',
          Default: 0.0,
          Unit: 'speed',
          DefaultUnit: 'm/s',
        },
        V: {
          Type: 'expression',
          Default: 0.0,
          Unit: 'speed',
          DefaultUnit: 'm/s',
        },
        W: {
          Type: 'expression',
          Default: 0.0,
          Unit: 'speed',
          DefaultUnit: 'm/s',
        },
      },
    },
    Default: 'Automatic',
  },
  CylindricalVelocityComponents: {
    HandleChange: {
      VelocityType: {
        Cylindrical: {},
      },
    },
    Type: {
      Automatic: {
        VelocityScale: {
          Type: 'expression',
          Default: 1.0,
          Unit: 'speed',
          DefaultUnit: 'm/s',
        },
      },
      'Automatic with Value': {
        VelocityAxialComponent: {
          Label: 'Axial Component',
          Type: 'expression',
          Default: 0.0,
          Unit: 'speed',
          DefaultUnit: 'm/s',
        },
        'Velocity r Component': {
          Label: 'Radial Component',
          Type: 'expression',
          Default: 0.0,
          Unit: 'speed',
          DefaultUnit: 'm/s',
        },
        VelocityThetaComponent: {
          Label: 'Theta Component',
          Type: 'expression',
          Default: 0.0,
          Unit: 'speed',
          DefaultUnit: 'm/s',
        },
        AxisDefinition: {
          Type: {
            CoordinateAxis: {
              RotationAxis: {
                Type: 'option',
                Options: ['Global X', 'Global Y', 'Global Z'],
                Default: 'Global Z',
              },
            },
            TwoPoints: {
              RotationAxisFrom: {
                Type: 'Arrayd',
                Default: [0.0, 0.0, 0.0],
              },
              RotationAxisTo: {
                Type: 'Arrayd',
                Default: [1.0, 0.0, 0.0],
              },
            },
          },
        },
      },
    },
    Default: 'Automatic',
  },
  StaticPressure: {
    Type: {
      Automatic: {},
      'Automatic with Value': {
        RelativePressure: {
          Type: 'expression',
          Default: 0.0,
          Unit: 'pressure',
          DefaultUnit: 'Pa',
        },
      },
    },
    Default: 'Automatic',
  },
  Temperature: {
    Type: {
      Automatic: {},
      'Automatic with Value': {
        Temperature: {
          Type: 'expression',
          Default: 0.0,
          Unit: 'temperature',
          DefaultUnit: 'K',
        },
      },
    },
  },
  TurbulenceInitialConditions: {
    Label: 'Turbulence',
    Type: {
      'Low Intensity and Eddy Viscosity Ratio': {
        Label: 'Low (Intensity = 1%)',
      },
      'Medium Intensity and Eddy Viscosity Ratio': {
        Label: 'Medium (Intensity = 5%)',
      },
      'High Intensity and Eddy Viscosity Ratio': {
        Label: 'High (Intensity = 10%)',
      },
      'Intensity and Eddy Viscosity Ratio': {
        FractionalIntensity: {
          Type: {
            Automatic: {},
            'Automatic with Value': {
              FractionalIntensity: {
                Label: 'Value',
                Type: 'expression',
                Default: 0.05,
              },
            },
          },
        },
        EddyViscosityRatio: {
          Type: {
            Automatic: {},
            'Automatic with Value': {
              EddyViscosityRatio: {
                Label: 'Value',
                Type: 'expression',
                Default: 10.0,
              },
            },
          },
        },
      },
      'Intensity and Length Scale': {
        FractionalIntensity: {
          Type: {
            Automatic: {},
            'Automatic with Value': {
              FractionalIntensity: {
                Label: 'Value',
                Type: 'expression',
                Default: 0.05,
              },
            },
          },
        },
        EddyLengthScale: {
          Type: {
            Automatic: {},
            'Automatic with Value': {
              EddyLengthScale: {
                Label: 'Value',
                Type: 'expression',
                Default: 0.0,
                Unit: 'length',
                DefaultUnit: 'm',
              },
            },
          },
        },
      },
      'k and Epsilon': {
        K: {
          Label: 'Turb. Kinetic Energy',
          Type: {
            Automatic: {},
            'Automatic with Value': {
              k: {
                Label: 'Value',
                Type: 'expression',
                Default: 0.0,
                Unit: ['m^2/s^2', 'J/kg'],
                DefaultUnit: 'm^2/s^2',
              },
            },
          },
        },
        EPSILON: {
          Type: {
            Automatic: {},
            'Automatic with Value': {
              Epsilon: {
                Label: 'Value',
                Type: 'expression',
                Default: 0.0,
                Unit: ['m^2/s^3', 'J/kg/s'],
                DefaultUnit: 'm^2/s^3',
              },
            },
          },
        },
      },
      'k and Omega': {
        K: {
          Label: 'Turb. Kinetic Energy',
          Type: {
            Automatic: {},
            'Automatic with Value': {
              k: {
                Label: 'Value',
                Type: 'expression',
                Default: 0.0,
                Unit: ['m^2/s^2', 'J/kg'],
                DefaultUnit: 'm^2/s^2',
              },
            },
          },
        },
        OMEGA: {
          Type: {
            Automatic: {},
            'Automatic with Value': {
              Omega: {
                Label: 'Value',
                Type: 'expression',
                Default: 0.0,
                Unit: ['s^-1'],
                DefaultUnit: 's^-1',
              },
            },
          },
        },
      },
      'k and Eddy Viscosity Ratio': {
        K: {
          Label: 'Turb. Kinetic Energy',
          Type: {
            Automatic: {},
            'Automatic with Value': {
              k: {
                Label: 'Value',
                Type: 'expression',
                Default: 0.0,
                Unit: ['m^2/s^2', 'J/kg'],
                DefaultUnit: 'm^2/s^2',
              },
            },
          },
        },
        OMEGA: {
          Type: {
            Automatic: {},
            'Automatic with Value': {
              Omega: {
                Label: 'Value',
                Type: 'expression',
                Default: 0.0,
                Unit: ['s^-1'],
                DefaultUnit: 's^-1',
              },
            },
          },
        },
      },
    },
    Default: 'Medium Intensity and Eddy Viscosity Ratio',
  },
};
export const CFDC = {
  Expressions: {
    AmcaxProp: {
      selfEditKey: '', // 表示本身就是一个对象，可以左键弹出表单编辑，值是对应的表单名称，空字符串表示自身；
      nameEditable: false, // 表示是否可以编辑名称；
      clickChildShowMe: true,
    },
    Pref: {
      Label: '参考压力',
      Type: 'double',
      Default: 101325.0,
      Unit: 'pressure',
      DefaultUnit: 'Pa',
    },
    Tref: {
      Label: '参考温度',
      Type: 'double',
      Default: 288.15,
      Unit: 'temperature',
      DefaultUnit: 'K',
    },
    a: {
      Label: '声速',
      Type: 'double',
      Default: 340,
      Unit: 'speed',
      DefaultUnit: 'm/s',
    },
    alpha: {
      Label: '攻角',
      Type: 'double',
      Default: 8,
      Unit: 'angle',
      DefaultUnit: '°',
    },
    cd: {
      Label: '阻力系数',
      Type: 'expression',
      Default: 'drag/(pdy*sref)',
    },
    cl: {
      Label: '升力系数',
      Type: 'expression',
      Default: 'lift/(pdy*sref)',
    },
    cm: {
      Type: 'expression',
      Default: 'my/(pdy*lref*sref)',
    },
    denfar: {
      Label: '空气密度',
      Type: 'double',
      Default: 1.225,
      Unit: 'density',
      DefaultUnit: 'kg/m^3',
    },
    drag: {
      Label: '阻力',
      Type: 'expression',
      Default:
        '(force_x()@fuselage+force_x()@nose+force_x()@wing)*cos(alpha)+(force_z()@fuselage+force_z()@nose+force_z()@wing)*sin(alpha)',
    },
    lift: {
      Label: '升力',
      Type: 'expression',
      Default:
        '(force_z()@fuselage+force_z()@nose+force_z()@wing)*cos(alpha)-(force_x()@fuselage+force_x()@nose+force_x()@wing)*sin(alpha)',
    },
    lref: {
      Label: '参考长度',
      Type: 'double',
      Default: 7,
      Unit: 'length',
      DefaultUnit: 'm',
    },
    ma: {
      Label: '马赫数',
      Type: 'double',
      Default: 0.2,
    },
    my: {
      Type: 'expression',
      Default: '-torque_z()@wing+force_y()@wing*xcent',
    },
    pdy: {
      Label: '压力面积',
      Type: 'expression',
      Default: '0.5*denfar*ma*ma*a*a',
    },
    sref: {
      Label: '参考面积',
      Type: 'double',
      Default: 192,
      Unit: 'area',
      DefaultUnit: 'm^2',
    },
    xcent: {
      Label: '力矩参考点（x方向）',
      Type: 'double',
      Default: 33.678,
      Unit: 'length',
      DefaultUnit: 'm',
    },
  },
  boundaries: {
    AmcaxProp: {
      childCreatable: true, // 是否可以添加新的子项
    },
    INLET: {
      AmcaxProp: ShowTypeBaseAmcaxProp,
      Location: {
        Type: 'Surface',
      },
      CoordFrame: {
        Maskable: true,
        Type: 'option',
        Options: ['Coord 0'],
        Default: 'Coord 0',
      },
      FlowRegime,
      MassAndMomentum: {
        Type: {
          NormalSpeed: {
            NormalSpeed: {
              Type: 'expression',
              Default: 100,
              Unit: 'speed',
              DefaultUnit: 'm/s',
            },
          },
          CartesianVelocityComponents: {
            U: {
              Type: 'expression',
              Default: 0.0,
              Unit: 'speed',
              DefaultUnit: 'm/s',
            },
            V: {
              Type: 'expression',
              Default: 0.0,
              Unit: 'speed',
              DefaultUnit: 'm/s',
            },
            W: {
              Type: 'expression',
              Default: 0.0,
              Unit: 'speed',
              DefaultUnit: 'm/s',
            },
          },
          CylindricalVelocityComponents: {
            VelocityAxialComponent: {
              Label: 'Axial Component',
              Type: 'expression',
              Default: 0.0,
              Unit: 'speed',
              DefaultUnit: 'm/s',
            },
            VelocityRadialComponent: {
              Label: 'Radial Component',
              Type: 'expression',
              Default: 0.0,
              Unit: 'speed',
              DefaultUnit: 'm/s',
            },
            VelocityThetaComponent: {
              Label: 'Theta Component',
              Type: 'expression',
              Default: 0.0,
              Unit: 'speed',
              DefaultUnit: 'm/s',
            },
            AxisDefinition: {
              Type: {
                CoordinateAxis: {
                  RotationAxis: {
                    Type: 'option',
                    Options: ['Global X', 'Global Y', 'Global Z'],
                    Default: 'Global Z',
                  },
                },
                TwoPoints: {
                  RotationAxisFrom: {
                    Type: 'Arrayd',
                    Default: [0.0, 0.0, 0.0],
                  },
                  RotationAxisTo: {
                    Type: 'Arrayd',
                    Default: [1.0, 0.0, 0.0],
                  },
                },
              },
            },
          },
          MassFlowRate: {
            MassFlowRate: {
              Type: 'expression',
              Default: 1.0,
              Unit: ['g/s', 'kg/s'],
              DefaultUnit: 'kg/s',
            },
            MassFlowRateArea: {
              Type: 'option',
              Options: ['Total for All Sectors', 'As Specified'],
              Default: 'As Specified',
            },
          },
          TotalPressure: {
            RelativePressure: {
              Type: 'expression',
              Default: 0,
              Unit: 'pressure',
              DefaultUnit: 'Pa',
            },
          },
          StaticPressure: {
            RelativePressure: {
              Type: 'expression',
              Default: 0,
              Unit: 'pressure',
              DefaultUnit: 'Pa',
            },
          },
        },
        EmitChange: true,
      },
      FlowDirection: {
        HandleChange: {
          MassAndMomentum: {
            MassFlowRate: {},
            TotalPressure: {},
            StaticPressure: {},
          },
        },
        Type: {
          'Normal to Boundary Condition': {},
          CartesianComponents: {
            'Unit Vector X Component': {
              Label: 'X Component',
              Type: 'expression',
              Default: 0.0,
            },
            'Unit Vector Y Component': {
              Label: 'Y Component',
              Type: 'expression',
              Default: 0.0,
            },
            'Unit Vector Z Component': {
              Label: 'Z Component',
              Type: 'expression',
              Default: 0.0,
            },
          },
          CylindricalComponents: {
            UnitVectorAxialComponent: {
              Label: 'Axial Component',
              Type: 'expression',
              Default: 0.0,
            },
            'Unit Vector r Component': {
              Label: 'Radial Component',
              Type: 'expression',
              Default: 0.0,
            },
            UnitVectorThetaComponent: {
              Label: 'Theta Component',
              Type: 'expression',
              Default: 0.0,
            },
            AxisDefinition: {
              Type: {
                CoordinateAxis: {
                  RotationAxis: {
                    Type: 'option',
                    Options: ['Global X', 'Global Y', 'Global Z'],
                    Default: 'Global Z',
                  },
                },
                TwoPoints: {
                  RotationAxisFrom: {
                    Type: 'Arrayd',
                    Default: [0.0, 0.0, 0.0],
                  },
                  RotationAxisTo: {
                    Type: 'Arrayd',
                    Default: [1.0, 0.0, 0.0],
                  },
                },
              },
            },
          },
        },
        Default: 'Normal to Boundary Condition',
      },
      Turbulence: {
        Type: {
          'Low Intensity and Eddy Viscosity Ratio': {
            Label: 'Low (Intensity = 1%)',
          },
          'Medium Intensity and Eddy Viscosity Ratio': {
            Label: 'Medium (Intensity = 5%)',
          },
          'High Intensity and Eddy Viscosity Ratio': {
            Label: 'High (Intensity = 10%)',
          },
          'Intensity and Length Scale': {
            FractionalIntensity: {
              Type: 'expression',
              Default: 0.05,
            },
            EddyLengthScale: {
              Type: 'expression',
              Default: 0.0,
              Unit: 'length',
              DefaultUnit: 'm',
            },
          },
          'Intensity and Eddy Viscosity Ratio': {
            FractionalIntensity: {
              Type: 'expression',
              Default: 0.05,
            },
            EddyViscosityRatio: {
              Type: 'expression',
              Default: 10.0,
            },
          },
          'k and Epsilon': {
            k: {
              Label: 'Turb. Kinetic Energy',
              Type: 'expression',
              Default: 0.0,
              Unit: ['m^2/s^2', 'J/kg'],
              DefaultUnit: 'm^2/s^2',
            },
            Epsilon: {
              Label: 'Turb. Eddy Dissipatior',
              Type: 'expression',
              Default: 0.0,
              Unit: ['m^2/s^3', 'J/kg/s'],
              DefaultUnit: 'm^2/s^3',
            },
          },
          'k and Omega': {
            k: {
              Label: 'Turb. Kinetic Energy',
              Type: 'expression',
              Default: 0.0,
              Unit: ['m^2/s^2', 'J/kg'],
              DefaultUnit: 'm^2/s^2',
            },
            Omega: {
              Label: 'Turb. Eddy Frequency',
              Type: 'expression',
              Default: 0.0,
              Unit: ['s^-1'],
              DefaultUnit: 's^-1',
            },
          },
          'k and Eddy Viscosity Ratio': {
            k: {
              Label: 'Turb. Kinetic Energy',
              Type: 'expression',
              Default: 0.0,
              Unit: ['m^2/s^2', 'J/kg'],
              DefaultUnit: 'm^2/s^2',
            },
            EddyViscosityRatio: {
              Type: 'expression',
              Default: 10.0,
            },
          },
          'k and Length Scale': {
            k: {
              Label: 'Turb. Kinetic Energy',
              Type: 'expression',
              Default: 0.0,
              Unit: ['m^2/s^2', 'J/kg'],
              DefaultUnit: 'm^2/s^2',
            },
            EddyLengthScale: {
              Type: 'expression',
              Default: 0.0,
              Unit: 'length',
              DefaultUnit: 'm',
            },
          },
          'Default Intensity and Autocompute Length Scale': {},
          'Intensity and Auto Compute Length': {
            FractionalIntensity: {
              Type: 'expression',
              Default: 0.05,
            },
          },
          ZeroGradient: {},
        },
        Default: 'Medium Intensity and Eddy Viscosity Ratio',
      },
      HeatTransfer: {
        Type: {
          StaticTemperature: {
            StaticTemperature: {
              Type: 'expression',
              Default: 0,
              Unit: 'temperature',
              DefaultUnit: 'K',
            },
          },
          TotalTemperature: {
            TotalTemperature: {
              Type: 'expression',
              Default: 0,
              Unit: 'temperature',
              DefaultUnit: 'K',
            },
          },
          TotalEnthalpy: {
            TotalEnthalpy: {
              Type: 'expression',
              Default: 0,
              Unit: ['J/kg'],
              DefaultUnit: 'J/kg',
            },
          },
        },
      },
    },
    OUTLET: {
      AmcaxProp: ShowTypeBaseAmcaxProp,
      Location: {
        Type: 'Surface',
      },
      CoordFrame: {
        Maskable: true,
        Type: 'option',
        Options: ['Coord 0'],
        Default: 'Coord 0',
      },
      FlowRegime,
      MassAndMomentum: {
        Type: {
          AverageStaticPressure: {
            RelativePressure: {
              Type: 'expression',
              Default: 0,
              Unit: 'pressure',
              DefaultUnit: 'Pa',
            },
            PressureProfileBlend: {
              Type: 'expression',
              Default: 0.05,
            },
          },
          NormalSpeed: {
            NormalSpeed: {
              Type: 'expression',
              Default: 100,
              Unit: 'speed',
              DefaultUnit: 'm/s',
            },
          },
          CartesianVelocityComponents: {
            U: {
              Type: 'expression',
              Default: 0.0,
              Unit: 'speed',
              DefaultUnit: 'm/s',
            },
            V: {
              Type: 'expression',
              Default: 0.0,
              Unit: 'speed',
              DefaultUnit: 'm/s',
            },
            W: {
              Type: 'expression',
              Default: 0.0,
              Unit: 'speed',
              DefaultUnit: 'm/s',
            },
          },
          CylindricalVelocityComponents: {
            VelocityAxialComponent: {
              Label: 'Axial Component',
              Type: 'expression',
              Default: 0.0,
              Unit: 'speed',
              DefaultUnit: 'm/s',
            },
            VelocityRadialComponent: {
              Label: 'Radial Component',
              Type: 'expression',
              Default: 0.0,
              Unit: 'speed',
              DefaultUnit: 'm/s',
            },
            VelocityThetaComponent: {
              Label: 'Theta Component',
              Type: 'expression',
              Default: 0.0,
              Unit: 'speed',
              DefaultUnit: 'm/s',
            },
            AxisDefinition: {
              Type: {
                CoordinateAxis: {
                  RotationAxis: {
                    Type: 'option',
                    Options: ['Global X', 'Global Y', 'Global Z'],
                    Default: 'Global Z',
                  },
                },
                TwoPoints: {
                  RotationAxisFrom: {
                    Type: 'Arrayd',
                    Default: [0.0, 0.0, 0.0],
                  },
                  RotationAxisTo: {
                    Type: 'Arrayd',
                    Default: [1.0, 0.0, 0.0],
                  },
                },
              },
            },
          },
          MassFlowRate: {
            MassFlowRate: {
              Type: 'expression',
              Default: 1.0,
              Unit: ['g/s', 'kg/s'],
              DefaultUnit: 'kg/s',
            },
            MassFlowRateArea: {
              Type: 'option',
              Options: ['Total for All Sectors', 'As Specified'],
              Default: 'Total for All Sectors',
            },
            MassFlowUpdate: {
              Label: 'Mass Flow Outlet Constraint',
              Maskable: true,
              Type: {
                ShiftPressure: {
                  PressureProfileShape: {
                    Type: 'expression',
                    Default: 0.0,
                    Unit: 'pressure',
                    DefaultUnit: 'Pa',
                  },
                  PressureProfileBlend: {
                    Type: 'expression',
                    Default: 0.05,
                  },
                },
                ConstantFlux: {},
              },
            },
          },
          TotalPressure: {
            RelativePressure: {
              Type: 'expression',
              Default: 0,
              Unit: 'pressure',
              DefaultUnit: 'Pa',
            },
          },
          StaticPressure: {
            RelativePressure: {
              Type: 'double',
              Default: 0,
              Unit: 'pressure',
              DefaultUnit: 'Pa',
            },
          },
        },
        EmitChange: true,
      },
      PressureAveraging: {
        HandleChange: {
          MassAndMomentum: {
            AverageStaticPressure: {},
          },
        },
        Type: {
          'Average Over Whole Outlet': {},
          Circumferential: {
            'Number of Circumferential Blands': {
              Maskable: true,
              Type: 'int',
              Default: 40,
            },
            AxisDefinition: {
              Type: {
                CoordinateAxis: {
                  RotationAxis: {
                    Type: 'option',
                    Options: ['Global X', 'Global Y', 'Global Z'],
                    Default: 'Global Z',
                  },
                },
                TwoPoints: {
                  RotationAxisFrom: {
                    Type: 'Arrayd',
                    Default: [0.0, 0.0, 0.0],
                  },
                  RotationAxisTo: {
                    Type: 'Arrayd',
                    Default: [1.0, 0.0, 0.0],
                  },
                },
              },
            },
          },
          RadialEquilibrium: {
            'Number of Circumferential Blands': {
              Maskable: true,
              Type: 'int',
              Default: 40,
            },
            RadialReferencePosition: {
              Type: {
                SpecifiedRadius: {
                  SpecifiedRadius: {
                    Type: 'expression',
                    Default: 0,
                    Unit: 'length',
                    DefaultUnit: 'm',
                  },
                },
                MinimumRadius: {},
                MaximumRadius: {},
              },
            },
            AxisDefinition: {
              Type: {
                CoordinateAxis: {
                  RotationAxis: {
                    Type: 'option',
                    Options: ['Global X', 'Global Y', 'Global Z'],
                    Default: 'Global Z',
                  },
                },
                TwoPoints: {
                  RotationAxisFrom: {
                    Type: 'Arrayd',
                    Default: [0.0, 0.0, 0.0],
                  },
                  RotationAxisTo: {
                    Type: 'Arrayd',
                    Default: [1.0, 0.0, 0.0],
                  },
                },
              },
            },
          },
        },
        Default: 'Average Over Whole Outlet',
      },
      // 'PressureAveraging@2': {
      //   HandleChange: {
      //     MassAndMomentum: {
      //       MassFlowRate: {},
      //     },
      //   },
      //   Type: {
      //     Circumferential: {
      //       'Number of Circumferential Blands': {
      //         Maskable: true, // TODO 支持可选字段
      //         Type: 'int',
      //         Default: 40,
      //       },
      //       AxisDefinition: {
      //         Type: {
      //           CoordinateAxis: {
      //             RotationAxis: {
      //               Type: 'option',
      //               Options: ['Global X', 'Global Y', 'Global Z'],
      //               Default: 'Global Z',
      //             },
      //           },
      //           TwoPoints: {
      //             RotationAxisFrom: {
      //               Type: 'Arrayd',
      //               Default: [0.0, 0.0, 0.0],
      //             },
      //             RotationAxisTo: {
      //               Type: 'Arrayd',
      //               Default: [1.0, 0.0, 0.0],
      //             },
      //           },
      //         },
      //       },
      //     },
      //     None: {},
      //     Default: 'None',
      //   },
      // },
    },
    OPENING: {
      AmcaxProp: ShowTypeBaseAmcaxProp,
      Location: {
        Type: 'Surface',
      },
      CoordFrame: {
        Maskable: true,
        Type: 'option',
        Options: ['Coord 0'],
        Default: 'Coord 0',
      },
      FlowRegime,
      MassAndMomentum: {
        EmitChange: true,
        Type: {
          'Opening Pressure and Direction': {
            RelativePressure: {
              Type: 'expression',
              Default: 0,
              Unit: 'pressure',
              DefaultUnit: 'Pa',
            },
          },
          'Static Pressure and Direction': {
            RelativePressure: {
              Type: 'expression',
              Default: 0,
              Unit: 'pressure',
              DefaultUnit: 'Pa',
            },
          },
          Entrainment: {
            RelativePressure: {
              Type: 'expression',
              Default: 0,
              Unit: 'pressure',
              DefaultUnit: 'Pa',
            },
            PreesureOption: {
              Maskable: true,
              Type: 'option',
              Options: ['Static Pressure', 'Opening Pressure'],
            },
          },
          CartesianVelocityComponents: {
            U: {
              Type: 'expression',
              Default: 0.0,
              Unit: 'speed',
              DefaultUnit: 'm/s',
            },
            V: {
              Type: 'expression',
              Default: 0.0,
              Unit: 'speed',
              DefaultUnit: 'm/s',
            },
            W: {
              Type: 'expression',
              Default: 0.0,
              Unit: 'speed',
              DefaultUnit: 'm/s',
            },
          },
          CylindricalVelocityComponents: {
            VelocityAxialComponent: {
              Label: 'Axial Component',
              Type: 'expression',
              Default: 0.0,
              Unit: 'speed',
              DefaultUnit: 'm/s',
            },
            VelocityRadialComponent: {
              Label: 'Radial Component',
              Type: 'expression',
              Default: 0.0,
              Unit: 'speed',
              DefaultUnit: 'm/s',
            },
            VelocityThetaComponent: {
              Label: 'Theta Component',
              Type: 'expression',
              Default: 0.0,
              Unit: 'speed',
              DefaultUnit: 'm/s',
            },
            AxisDefinition: {
              Type: {
                CoordinateAxis: {
                  RotationAxis: {
                    Type: 'option',
                    Options: ['Global X', 'Global Y', 'Global Z'],
                    Default: 'Global Z',
                  },
                },
                TwoPoints: {
                  RotationAxisFrom: {
                    Type: 'Arrayd',
                    Default: [0.0, 0.0, 0.0],
                  },
                  RotationAxisTo: {
                    Type: 'Arrayd',
                    Default: [1.0, 0.0, 0.0],
                  },
                },
              },
            },
          },
        },
        Default: 'Opening Pressure and Direction',
      },
      FlowDirection: {
        HandleChange: {
          MassAndMomentum: {
            'Opening Pressure and Direction': {},
            'Static Pressure and Direction': {},
          },
        },
        Type: {
          'Normal to Boundary Condition': {},
          CartesianComponents: {
            'Unit Vector X Component': {
              Label: 'X Component',
              Type: 'expression',
              Default: 0.0,
            },
            'Unit Vector Y Component': {
              Label: 'Y Component',
              Type: 'expression',
              Default: 0.0,
            },
            'Unit Vector Z Component': {
              Label: 'Z Component',
              Type: 'expression',
              Default: 0.0,
            },
          },
          CylindricalComponents: {
            UnitVectorAxialComponent: {
              Label: 'Axial Component',
              Type: 'expression',
              Default: 0.0,
            },
            'Unit Vector r Component': {
              Label: 'Radial Component',
              Type: 'expression',
              Default: 0.0,
            },
            UnitVectorThetaComponent: {
              Label: 'Theta Component',
              Type: 'expression',
              Default: 0.0,
            },
            AxisDefinition: {
              Type: {
                CoordinateAxis: {
                  RotationAxis: {
                    Type: 'option',
                    Options: ['Global X', 'Global Y', 'Global Z'],
                    Default: 'Global Z',
                  },
                },
                TwoPoints: {
                  RotationAxisFrom: {
                    Type: 'Arrayd',
                    Default: [0.0, 0.0, 0.0],
                  },
                  RotationAxisTo: {
                    Type: 'Arrayd',
                    Default: [1.0, 0.0, 0.0],
                  },
                },
              },
            },
          },
        },
        Default: 'Normal to Boundary Condition',
      },
      LossCoefficient: {
        Maskable: true,
        HandleChange: {
          MassAndMomentum: {
            'Opening Pressure and Direction': {},
            'Static Pressure and Direction': {},
            Entrainment: {},
          },
        },
        Type: 'expression',
        Default: 0,
      },
      Turbulence: {
        Type: {
          'Low Intensity and Eddy Viscosity Ratio': {
            Label: 'Low (Intensity = 1%)',
          },
          'Medium Intensity and Eddy Viscosity Ratio': {
            Label: 'Medium (Intensity = 5%)',
          },
          'High Intensity and Eddy Viscosity Ratio': {
            Label: 'High (Intensity = 10%)',
          },
          'Intensity and Length Scale': {
            FractionalIntensity: {
              Type: 'expression',
              Default: 0.05,
            },
            EddyLengthScale: {
              Type: 'expression',
              Default: 0.0,
              Unit: 'length',
              DefaultUnit: 'm',
            },
          },
          'Intensity and Eddy Viscosity Ratio': {
            FractionalIntensity: {
              Type: 'expression',
              Default: 0.05,
            },
            EddyViscosityRatio: {
              Type: 'expression',
              Default: 10.0,
            },
          },
          'k and Epsilon': {
            k: {
              Label: 'Turb. Kinetic Energy',
              Type: 'expression',
              Default: 0.0,
              Unit: ['m^2/s^2', 'J/kg'],
              DefaultUnit: 'm^2/s^2',
            },
            Epsilon: {
              Label: 'Turb. Eddy Dissipatior',
              Type: 'expression',
              Default: 0.0,
              Unit: ['m^2/s^3', 'J/kg/s'],
              DefaultUnit: 'm^2/s^3',
            },
          },
          'k and Omega': {
            k: {
              Label: 'Turb. Kinetic Energy',
              Type: 'expression',
              Default: 0.0,
              Unit: ['m^2/s^2', 'J/kg'],
              DefaultUnit: 'm^2/s^2',
            },
            Omega: {
              Label: 'Turb. Eddy Frequency',
              Type: 'expression',
              Default: 0.0,
              Unit: ['s^-1'],
              DefaultUnit: 's^-1',
            },
          },
          'k and Eddy Viscosity Ratio': {
            k: {
              Label: 'Turb. Kinetic Energy',
              Type: 'expression',
              Default: 0.0,
              Unit: ['m^2/s^2', 'J/kg'],
              DefaultUnit: 'm^2/s^2',
            },
            EddyViscosityRatio: {
              Type: 'expression',
              Default: 10.0,
            },
          },
          'k and Length Scale': {
            k: {
              Label: 'Turb. Kinetic Energy',
              Type: 'expression',
              Default: 0.0,
              Unit: ['m^2/s^2', 'J/kg'],
              DefaultUnit: 'm^2/s^2',
            },
            EddyLengthScale: {
              Type: 'expression',
              Default: 0.0,
              Unit: 'length',
              DefaultUnit: 'm',
            },
          },
          'Default Intensity and Autocompute Length Scale': {},
          'Intensity and Auto Compute Length': {
            FractionalIntensity: {
              Type: 'expression',
              Default: 0.05,
            },
          },
          ZeroGradient: {},
        },
        Default: 'Medium Intensity and Eddy Viscosity Ratio',
      },
      HeatTransfer: {
        Type: {
          OpeningTemperature: {
            OpeningTemperature: {
              Type: 'expression',
              Default: 0.0,
              Unit: 'temperature',
              DefaultUnit: 'K',
            },
          },
          StaticTemperature: {
            StaticTemperature: {
              Type: 'expression',
              Default: 0.0,
              Unit: 'temperature',
              DefaultUnit: 'K',
            },
          },
        },
      },
    },
    WALL: {
      AmcaxProp: ShowTypeBaseAmcaxProp,
      Location: {
        Type: 'Surface',
      },
      CoordFrame: {
        Maskable: true,
        Type: 'option',
        Options: ['Coord 0'],
        Default: 'Coord 0',
      },
      MassAndMomentum: {
        EmitChange: true,
        Type: {
          NoSlipWall: {
            WallVelocity: {
              Maskable: true,
              Type: {
                CartesianComponents: {
                  WallU: {
                    Type: 'expression',
                    Default: 0.0,
                    Unit: 'speed',
                    DefaultUnit: 'm/s',
                  },
                  WallV: {
                    Type: 'expression',
                    Default: 0.0,
                    Unit: 'speed',
                    DefaultUnit: 'm/s',
                  },
                  WallW: {
                    Type: 'expression',
                    Default: 0.0,
                    Unit: 'speed',
                    DefaultUnit: 'm/s',
                  },
                },
                CylindricalComponents: {
                  UnitVectorAxialComponent: {
                    Label: 'Axial Component',
                    Type: 'double',
                    Default: 0.0,
                    Unit: 'speed',
                    DefaultUnit: 'm/s',
                  },
                  'Unit Vector r Component': {
                    Label: 'Radial Component',
                    Type: 'double',
                    Default: 0.0,
                    Unit: 'speed',
                    DefaultUnit: 'm/s',
                  },
                  UnitVectorThetaComponent: {
                    Label: 'Theta Component',
                    Type: 'double',
                    Default: 0.0,
                    Unit: 'speed',
                    DefaultUnit: 'm/s',
                  },
                  AxisDefinition: {
                    Type: {
                      CoordinateAxis: {
                        RotationAxis: {
                          Type: 'option',
                          Options: ['Global X', 'Global Y', 'Global Z'],
                          Default: 'Global Z',
                        },
                      },
                      TwoPoints: {
                        RotationAxisFrom: {
                          Type: 'Arrayd',
                          Default: [0.0, 0.0, 0.0],
                        },
                        RotationAxisTo: {
                          Type: 'Arrayd',
                          Default: [1.0, 0.0, 0.0],
                        },
                      },
                    },
                  },
                },
                RotatingWall: {
                  AngularVelocity: {
                    Type: 'expression',
                    Default: 0.0,
                    Unit: ['radian/s'],
                    DefaultUnit: 'radian/s',
                  },
                  AxisDefinition: {
                    Type: {
                      CoordinateAxis: {
                        RotationAxis: {
                          Type: 'option',
                          Options: ['Global X', 'Global Y', 'Global Z'],
                          Default: 'Global Z',
                        },
                      },
                      TwoPoints: {
                        RotationAxisFrom: {
                          Type: 'Arrayd',
                          Default: [0.0, 0.0, 0.0],
                        },
                        RotationAxisTo: {
                          Type: 'Arrayd',
                          Default: [1.0, 0.0, 0.0],
                        },
                      },
                    },
                  },
                },
              },
            },
          },
          FreeSlipWall: {},
          SpecifiedShear: {
            ShearStress: {
              Type: {
                CartesianComponents: {
                  'Unit Vector X Component': {
                    Label: 'X Component',
                    Type: 'expression',
                    Default: 0.0,
                  },
                  'Unit Vector Y Component': {
                    Label: 'Y Component',
                    Type: 'expression',
                    Default: 0.0,
                  },
                  'Unit Vector Z Component': {
                    Label: 'Z Component',
                    Type: 'expression',
                    Default: 0.0,
                  },
                },
                CylindricalComponents: {
                  UnitVectorAxialComponent: {
                    Label: 'Axial Component',
                    Type: 'expression',
                    Default: 0.0,
                  },
                  'Unit Vector r Component': {
                    Label: 'Radial Component',
                    Type: 'expression',
                    Default: 0.0,
                  },
                  UnitVectorThetaComponent: {
                    Label: 'Theta Component',
                    Type: 'expression',
                    Default: 0.0,
                  },
                  AxisDefinition: {
                    Type: {
                      CoordinateAxis: {
                        RotationAxis: {
                          Type: 'option',
                          Options: ['Global X', 'Global Y', 'Global Z'],
                          Default: 'Global Z',
                        },
                      },
                      TwoPoints: {
                        RotationAxisFrom: {
                          Type: 'Arrayd',
                          Default: [0.0, 0.0, 0.0],
                        },
                        RotationAxisTo: {
                          Type: 'Arrayd',
                          Default: [1.0, 0.0, 0.0],
                        },
                      },
                    },
                  },
                },
              },
              Default: 'CartesianComponents',
            },
          },
        },
        Default: 'NoSlipWall',
      },
      WallRoughness: {
        HandleChange: {
          MassAndMomentum: {
            NoSlipWall: {},
            SpecifiedShear: {},
          },
        },
        Type: {
          SmoothWall: {},
          RoughWall: {
            SandGrainRoughness: {
              Type: 'expression',
              Default: 0,
              Unit: 'length',
              DefaultUnit: 'm',
            },
          },
          HighRoughness: {
            SandGrainRoughness: {
              Type: 'expression',
              Default: 0,
              Unit: 'length',
              DefaultUnit: 'm',
            },
          },
        },
      },
      HeatTransfer: {
        Type: {
          Adiabatic: {},
        },
      },
    },
    SYMMETRY: {
      AmcaxProp: ShowTypeBaseAmcaxProp,
      Location: {
        Type: 'Surface',
      },
    },
  },
  Initialization: {
    AmcaxProp: {
      selfEditKey: '', // 表示本身就是一个对象，可以左键弹出表单编辑，值是对应的表单名称，空字符串表示自身；
      nameEditable: false, // 表示是否可以编辑名称；
      notListChildren: true, // 表示不显示子项；
    },
    CoordFrame: {
      Maskable: true,
      Type: 'option',
      Options: ['Coord 0'],
      Default: 'Coord 0',
    },
    InitialConditions,
  },
  Domain: {
    AmcaxProp: {
      selfEditKey: 'Basic', // 表示本身就是一个对象，可以左键弹出表单编辑，值是对应的表单名称；
      notListChildren: true, // 表示不显示子项；
    },
    Basic: {
      AmcaxProp: {
        nameEditable: false, // 表示是否可以编辑名称；
      },
      Location: {
        Type: 'option',
        Options: ['fluid_1'],
        Default: 'fluid_1',
      },
      DomainType: {
        Type: 'option',
        Options: ['Fluid'],
        Default: 'Fluid',
      },
      CoordFrame: {
        Type: 'option',
        Options: ['Coord 0'],
        Default: 'Coord 0',
      },
      FluidDefinition: {
        Type: {
          MaterialLibrary: {
            Material: {
              Type: 'option',
              Options: ['Air at 25 C', 'Air Ideal Gas'],
              Default: 'Air at 25 C',
            },
            Morphology: {
              Type: {
                ContinuousFluid: {
                  MinimumVolumeFraction: {
                    Maskable: true,
                    Type: 'expression',
                    default: 0.0,
                  },
                },
              },
            },
          },
        },
      },
      DomainModels: {
        Type: 'group',
        ReferencePressure: {
          Type: 'group',
          ReferencePressure: {
            Type: 'expression',
            Default: 1,
            Unit: ['Pa'],
            DefaultUnit: 'Pa',
          },
        },
        BuoyancyModel: {
          EmitChange: true,
          Type: {
            NonBuoyant: {},
            Buoyant: {
              GravityXComponent: {
                Type: 'expression',
                Default: 0.0,
                Unit: ['m/s^2'],
                DefaultUnit: 'm/s^2',
              },
              GravityYComponent: {
                Type: 'expression',
                Default: 0.0,
                Unit: ['m/s^2'],
                DefaultUnit: 'm/s^2',
              },
              GravityZComponent: {
                Type: 'expression',
                Default: 0.0,
                Unit: ['m/s^2'],
                DefaultUnit: 'm/s^2',
              },
              BuoyancyReferenceLocation: {
                HandleChange: {
                  DomianModels: {
                    BuoyancyMode: {},
                  },
                },
                Type: {
                  Automatic: {},
                  CartesianCoordinates: {
                    CartesianCoordinates: {
                      Type: 'Arrayd',
                      Default: [0.0, 0.0, 0.0],
                    },
                  },
                },
              },
            },
          },
        },
        DomainMotion: {
          Type: {
            Stationary: {},
            Rotating: {
              AngularVelocity: {
                Type: 'expression',
                Default: 0.0,
                Unit: ['radian/s'],
                DefaultUnit: 'radian/s',
              },
              AlternateRotationModel: {
                Type: 'bool',
                Default: false,
              },
              AxisDefinition: {
                Type: {
                  CoordinateAxis: {
                    RotationAxis: {
                      Type: 'option',
                      Options: ['Coord 0.1', 'Coord 0.2', 'Coord 0.3'],
                      Default: 'Coord 0.3',
                    },
                    TwoPoints: {
                      RotationAxisFrom: {
                        Type: 'Arrayd',
                        Default: [0.0, 0.0, 0.0],
                      },
                      RotationAxisTo: {
                        Type: 'Arrayd',
                        Default: [1.0, 0.0, 0.0],
                      },
                    },
                  },
                },
              },
            },
          },
        },
        MeshDeformation: {
          Type: {
            None: {},
            'Regions of Motion Specifed': {
              DisplacementRelativeTo: {
                Type: 'option',
                Options: ['Initial Mesh', 'Previous Mesh'],
                Default: 'Initial Mesh',
              },
              MeshMotionModel: {
                Type: {
                  DisplacementDiffusion: {
                    MeshStiffness: {
                      Type: {
                        'Increase near Small Volumes': {
                          StiffnessModelExponent: {
                            Type: 'expression',
                            Default: 2.0,
                          },
                          ReferenceVolume: {
                            Type: {
                              MeanControlVolume: {},
                              ReferenceVolume: {
                                ReferenceVolume: {
                                  Type: 'expression',
                                  Default: 1.0,
                                  Unit: ['m^3'],
                                  DefaultUnit: 'm^3',
                                },
                              },
                            },
                          },
                        },
                      },
                      'Increase near Boundaries': {
                        StiffnessModelExponent: {
                          Type: 'expression',
                          Default: 2.0,
                        },
                        ReferenceDistance: {
                          Type: {
                            GlobalLengthScale: {},
                            Value: {
                              ReferenceDistance: {
                                Type: 'expression',
                                Default: 1.0,
                                Unit: ['m'],
                                DefaultUnit: 'm',
                              },
                            },
                          },
                        },
                      },
                      'Blended Distance and Small Volumes': {},
                      Value: {
                        MeshStiffness: {
                          Type: 'expression',
                          Default: 1.0,
                          Unit: ['m^2/s'],
                          DefaultUnit: 'm^2/s',
                        },
                      },
                    },
                  },
                },
              },
            },
          },
        },
      },
    },
    /** 暂时不使用这两个参数
    FluidModels: {
      HeatTransferModel: {
        Type: {
          Isothermal: {
            FluidTemperature: {
              Type: 'expression',
              Default: 25,
              Unit: 'temperature',
              DefaultUnit: 'C',
            },
          },
        },
      },
      TurbulenceModel: {
        EmitChange: true,
        Type: {
          SST: {
            BuoyancyTurbulence: {
              Type: {
                None: {},
              },
            },
            ReattachmentModification: {
              Type: {
                ReattchementProduction: {
                  CLRCoefficient: {
                    Maskable: true,
                    Type: 'expression',
                    Default: 10.0,
                  },
                },
              },
            },
          },
        },
      },
      TurbulentWallFunctions: {
        HandleChange: {
          TurbulenceModel: {
            SST: {},
          },
        },
      },
      ThermalRadiationModel: {
        Type: {
          None: {},
        },
      },
    },
    Initialization: {
      Maskable: true,
      Option: {
        Type: 'option',
        Options: ['Automatic'],
        Default: 'Automatic',
      },
      FrameType: {
        Type: 'option',
        Options: ['Stationary', 'Frame 2'],
        Default: 'Stationary',
      },
      InitialConditions,
    },
     */
  },
  solver: {
    AmcaxProp: {
      autoCreateChild: true, // 是否自动创建child
    },
    SolverControl: {
      AmcaxProp: {
        nameEditable: false, // 表示是否可以编辑名称；
        notListChildren: true, // 表示不显示子项
        selfEditKey: '',
      },
      TurbulenceNumerics: {
        Type: 'option',
        Options: ['First Order', 'High Resolution'],
        Default: 'High Resolution',
      },
      AdvectionScheme: {
        Type: {
          'High Resolution': {},
        },
        Default: 'High Resolution',
      },
      ConvergenceControl: {
        Type: 'group',
        LengthScaleOption: {
          Type: 'option',
          Options: ['Conservative'],
          Default: 'Conservative',
        },
        'Maximum Number of Iterations': {
          Type: 'int',
          Default: 100,
        },
        'Minimum Number of Iterations': {
          Type: 'int',
          Default: 1,
        },
        TimescaleControl: {
          Type: 'option',
          Options: ['Auto Timescale'],
          Default: 'Auto Timescale',
        },
        TimescaleFactor: {
          Type: 'double',
          Default: 1.0,
        },
      },
      ConvergenceCriteria: {
        Type: 'group',
        ResidualType: {
          Type: 'option',
          Options: ['RMS'],
          Default: 'RMS',
        },
        ResidualTarget: {
          Type: 'double',
          Default: 1e-4,
        },
      },
      DynamicModelControl: {
        Type: 'group',
        GlobalDynamicModelControl: {
          Type: 'option',
          Options: ['On'],
          Default: 'On',
        },
      },
      InterruptControl: {
        Type: {
          AnyInterrupt: {
            ConvergenceConditions: {
              Type: {
                'Default Conditions': {},
              },
              Default: 'Default Conditions',
            },
          },
        },
      },
    },
  },
};
